<?php
namespace App;

use Phalcon\Config;

if(defined('ENVIRONMENT') && ENVIRONMENT == 'development') {
    $database = [
        'adapter'  => 'Mysql',
        'host'     => '114.215.104.75',
        'username' => 'mzc_dev',
        'password' => '3h5j5z6k93h5#meadjohnson_dev',
        'dbname'   => 'meadjohnson_dev',
    ];
} else {
    $database = [
        'adapter'  => 'Mysql',
        'host'     => '127.0.0.1',
        'username' => 'root',
        'password' => '',
        'dbname'   => 'meadjohnson_dev',
    ];
}

return new Config([
    'database'              => $database,
    'application'           => [
        'configDir'      => APP_PATH . 'Config/',
        'cacheDir'       => APP_PATH . 'Cache/',
        'controllersDir' => APP_PATH . 'Controllers/',
        'modelsDir'      => APP_PATH . 'Models/',
        'viewsDir'       => APP_PATH . 'Views/',
        'pluginsDir'     => APP_PATH . 'Plugins/',
        'libraryDir'     => APP_PATH . 'Library/',
        'vendorDir'      => APP_PATH . 'Vendor/',
        'logsDir'        => APP_PATH . 'Logs/',
        'baseUri'        => '/',
        'assetsUrl'      => '/',
    ],
    'SmsWhiteList'          => [
        '127.0.0.1',
        //'14.18.158.138',/*广州悦策网络科技有限公司*/
        //'116.213.92.182',
        //'116.213.92.162',
        //'116.213.92.144',
        //'116.213.92.181',
        //'116.213.92.151',
        //'115.29.242.249',
        //'121.196.233.140',
        //'114.55.2.128',
        //'114.55.3.22',
        //'114.55.10.78',
        //'114.55.2.114',
        //'114.55.2.64',
        //'114.55.3.36',
        //'114.55.10.97',
        //'120.27.142.47',
        //'114.55.2.241',
        '114.55.67.2',//CRM供应商的正式环境的正式域名
        '58.67.213.151',
        '58.67.213.152',
        '58.67.213.153',
        '58.67.213.154',
        '58.67.213.155',
        '58.67.213.156'
    ],
    'SmsWhiteListRanges'    => [
        [
            'start' => '182.50.76.0',
            'end'   => '182.50.79.254'
        ],
        [
            'start' => '202.129.242.0',
            'end'   => '202.129.243.254'
        ],
    ],
    'SmsTriggerGateway'     => 'chanzor',
    'SmsTriggerGateways'    => ['daredo', 'yunpian', 'chanzor'],
    'SmsTestTriggerGateway' => 'daredotest',
    'SmsGateways'           => defined('ENVIRONMENT') && ENVIRONMENT == 'development' ? [
        'daredo'  => 'http://mzc.in/sms/send/daredo/',
        'daredo2' => 'http://mzc.in/sms/send/daredo2/',
    ] : [
        'daredo'  => 'http://meadjohnson.joypaw.com/sms/send/daredo/',
        'daredo2' => 'http://meadjohnson.joypaw.com/sms/send/daredo2/',
    ],
    'HDAPI'                 => [
        '7300' => defined('ENVIRONMENT') && ENVIRONMENT == 'development' ? 'http://test.boldseas.com/bwp/mow.SMSRegisterAndUpdate.action' : 'http://svr.meadjohnson.com.cn/bwp/mow.SMSRegisterAndUpdate.action',
        '7288' => defined('ENVIRONMENT') && ENVIRONMENT == 'development' ? 'http://test.boldseas.com/bwp/mow.buyOneGetOneWiseMediaAction.action' : 'http://svr.meadjohnson.com.cn/bwp/mow.buyOneGetOneWiseMediaAction.action'
    ],
    'HD_API_TEST'           => [
        '7300' => 'http://svr.mjnqy.com/Sms/SendSmsRegister',
        '7288' => 'http://svr.mjnqy.com/Sms/SendSmsSecurity'
    ],
    'excel_log_path'        => defined('ENVIRONMENT') && ENVIRONMENT == 'development' ? APP_PATH . 'Cache/' : '',
]);
